package com.gcb.common.enums;

/**
 * 价格类型
 */
public enum PriceTypeEnum {
    FIXED_PRICE(1, "一口价"), NEGOTIABLE(2, "价格面议");

    private final Integer code;
    private final String info;

    PriceTypeEnum(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public Integer getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfo(Integer type) {
        for (PriceTypeEnum priceTypeEnum : PriceTypeEnum.values()) {
            if (priceTypeEnum.getCode().equals(type)) {
                return priceTypeEnum.getInfo();
            }
        }
        return null;
    }
}
